package com.sinoglobal.dumping.dumplingtype;

import com.sinoglobal.dumping.fragment.Dumpling_HomeFragment;

import static com.sinoglobal.dumping.base.Dumpling_SinoConstans.TYPE_DUMPLING_COUPON_3;
import static com.sinoglobal.dumping.base.Dumpling_SinoConstans.TYPE_DUMPLING_COUPON_5;
import static com.sinoglobal.dumping.base.Dumpling_SinoConstans.TYPE_DUMPLING_COUPON_6;
import static com.sinoglobal.dumping.base.Dumpling_SinoConstans.TYPE_DUMPLING_COUPON_7;
import static com.sinoglobal.dumping.base.Dumpling_SinoConstans.TYPE_DUMPLING_MONEY;
import static com.sinoglobal.dumping.base.Dumpling_SinoConstans.TYPE_DUMPLING_WISH;


/**
 * Created by KeZhuang on 2016/1/26.
 */
public class DumplingTypeFactory{

    public AbsDumplingType getType(Dumpling_HomeFragment fragment, int dumplingType) {
        switch (dumplingType) {
            case TYPE_DUMPLING_MONEY:
                return new DumplingTypeMoney(fragment);
            case TYPE_DUMPLING_WISH:
                return new DumplingTypeWish(fragment);
            case TYPE_DUMPLING_COUPON_3:
            case TYPE_DUMPLING_COUPON_5:
            case TYPE_DUMPLING_COUPON_6:
            case TYPE_DUMPLING_COUPON_7:
                return new DumplingTypeCoupon(fragment);
        }
        return null;
    }
}
